<% layout('./layout/layout') %>
<% block('header').append(`<style></style>`)%>
<div class="row">
  <div class="col-md-12">
    <div class="box box-info">
      <div class="box-header with-border">
        <h3 class="box-title"><%=curr.isNew?'添加':'修改'%>用户</h3>
      </div>
      <!-- /.box-header -->
      <!-- form start -->
      <form action="<%=assetsPath %>/users/add" method="post" class="form-horizontal" novalidate>
        <div class="box-body">
          <div class="form-group">
            <label for="userName"  class="col-sm-2 control-label">用户登录名</label>
            <div class="col-sm-10">
              <input name="userName" readonly type="text" value="<%=curr.userName || ''%>" class="form-control"  placeholder="用户登录名">
            </div>
          </div>
          <div class="form-group">
            <label for="nickname" class="col-sm-2 control-label">昵称</label>
            <div class="col-sm-10">
              <input name="nickname" type="text" value="<%=curr.nickname || ''%>" class="form-control"  placeholder="昵称">
            </div>
          </div>
          <div class="form-group">
            <label for="mobile" class="col-sm-2 control-label">手机号码</label>
            <div class="col-sm-10">
              <input name="mobile" type="text" value="<%=curr.mobile || ''%>" class="form-control"  placeholder="手机号码">
            </div>
          </div>
          <div class="form-group">
            <label for="email" class="col-sm-2 control-label">电子邮箱</label>
            <div class="col-sm-10">
              <input name="email" type="text" value="<%=curr.email || ''%>" class="form-control"  placeholder="电子邮箱">
            </div>
          </div>
          <div class="form-group">
            <label for="email" class="col-sm-2 control-label">是否有效</label>
            <div class="col-sm-10">
              <select name="isLock" class="form-control">
                <option <%=curr.isLock === 0?'selected':'' %> value="0">有效</option>
                <option <%=curr.isLock === 1?'selected':'' %> value="1">无效</option>
              </select>
            </div>
          </div>
        </div>

        <!-- /.box-body -->
        <div class="box-footer">
          <div class="col-sm-offset-2 col-sm-10">
              <% if(!curr.isNew) { %>
                <input name="_id" type="hidden" value="<%=curr._id%>" >
              <% }%>
            <button type="submit" class="btn btn-info ">保存</button>
            <button type="reset" class="btn btn-default">重置</button>
          </div>
        </div>
        <!-- /.box-footer -->
      </form>
    </div>
  </div>
</div>
<% block('footer').append(`<script>
    jQuery(function() {

    })
</script>`)%>